version: '3.9'

services:
  database:
    image: postgres:latest
    environment:
      - POSTGRES_DB=k8s_db
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=admin1234

  webapi:
    image: olegprog2020/k8s-app:1.0
    ports:
      - "8080:8080"
    depends_on:
      - database